6. 極座標と極方程式#

6.1. 準備#

6.1.1. 授業資料#

Hide code cell source
# おまじない。1度実行しましょう。
!pip install japanize-matplotlib
Hide code cell output
Collecting japanize-matplotlib
  Downloading japanize-matplotlib-1.1.3.tar.gz (4.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 32.9 MB/s eta 0:00:00
?25h  Preparing metadata (setup.py) ... ?25l?25hdone
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from japanize-matplotlib) (3.8.0)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (1.3.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (4.55.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (1.4.7)
Requirement already satisfied: numpy<2,>=1.21 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (1.26.4)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (24.2)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (11.0.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (3.2.0)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib->japanize-matplotlib) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib->japanize-matplotlib) (1.17.0)
Building wheels for collected packages: japanize-matplotlib
  Building wheel for japanize-matplotlib (setup.py) ... ?25l?25hdone
  Created wheel for japanize-matplotlib: filename=japanize_matplotlib-1.1.3-py3-none-any.whl size=4120257 sha256=2131d7dd176f39e6e0de0bb97a03659a83c61cf5bd13b4208d4e0c1a0dd18612
  Stored in directory: /root/.cache/pip/wheels/61/7a/6b/df1f79be9c59862525070e157e62b08eab8ece27c1b68fbb94
Successfully built japanize-matplotlib
Installing collected packages: japanize-matplotlib
Successfully installed japanize-matplotlib-1.1.3
Hide code cell source
# おまじない。1度実行しましょう
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.collections
import matplotlib.animation
import matplotlib.colors
import japanize_matplotlib
import math
from IPython.display import HTML

# おまじないその2
## 曲座標→デカルト座標
def coordinate(r, theta):
  x = r * np.cos(theta)
  y = r * np.sin(theta)
  return x, y

def draw_step(ax, r, theta):
    artist = []
    x, y = coordinate(r, theta)
    artist.extend(ax.plot(x, y, 'ro'))
    artist.extend(ax.plot([0, x], [0, y], color='blue', linestyle='--'))
    artist.append(ax.text(x, y, r"$r = {:.2f}$".format(r) + "\n"+ r"$\theta = {:.2f}$".format(theta), ha='right'))
    return artist

def draw_steps(ax, artist_prev, r, theta):
    artist = []
    x, y = coordinate(r, theta)
    artist_prev.extend(ax.plot(x, y, 'ro'))
    artist.extend(artist_prev)
    artist.extend(ax.plot([0, x], [0, y], color='blue', linestyle='--'))
    artist.append(ax.text(x, y, r"$r = {:.2f}$".format(abs(r)) + "\n"+ r"$\theta = {:.2f}$".format(theta), ha='right'))
    return artist

def draw_finish(ax, artist_prev, X, Y, pole = '極'):
  ax.plot(0,0, 'o', color = 'b')
  ax.text(0,0.01, pole)
  ax.set_xlabel('$x$')
  ax.set_ylabel('$y$')
  ax.grid()

  artist = []
  artist.extend(artist_prev)
  artist.extend(ax.plot(X, Y, color='blue'))
  return artist

6.2. 復習/媒介変数表示#

6.2.1. 例/サイクロイド#

サイクロイドの媒介変数表示は次のようになっていました。

\[\begin{equation*} \begin{cases} x = a(\theta - \sin \theta) & \\ y= a(1-\cos \theta) & \end{cases} \end{equation*}\]

これを\(\theta\)の変化がわかるように描くと次の図のようになります。

Hide code cell source
# aの値
a = 0.5

## 描画の細かさ (θの幅指定。細かくしたければここの値を小さくすれば良いです)
stp = 0.2

# 極方程式
def f(x):
  return a * (x - np.sin(x)), a * (1 - np.cos(x))


# 円描画用theta
stp_line = 0.00001
circ_x, circ_y = coordinate(a, np.arange(0, 2 * np.pi, stp_line))
circ_y = circ_y + a

# サイクロイドアニメーション用
def step_cycloid(ax, artist_prev, theta):
    artist = []
    x, y = f(theta)
    artist_prev.extend(ax.plot(x, y, 'ro', alpha = 0.4))
    cx = circ_x + a * theta
    cy = circ_y

    c_center_x, c_center_y = a * theta, a
    artist.extend(artist_prev)
    artist.extend(ax.plot(c_center_x , c_center_y ,'ro' , alpha = 0.6))
    artist.extend(ax.plot(cx, cy, color='blue', alpha = 0.5))
    artist.append(ax.arrow(c_center_x, c_center_y, -a * np.sin(theta), -a * np.cos(theta), head_width=0.1, head_length=0.1,ec='green'))
    artist.append(ax.text(c_center_x, c_center_y, r"$\theta = {:.2f}$".format(theta), ha='right', color='black'))
    return artist

theta = np.arange(0, 3 * np.pi, stp_line)
thetas = np.arange(0, 3 * np.pi, stp)

# base figure
X,Y = f(theta)
fig, ax = plt.subplots()
ax.set_aspect('equal')

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(step_cycloid(ax, artist_prev, t))

artists.append(draw_finish(ax, artist_prev, X, Y, pole='O'))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode='once')
plt.close(fig)
# ani.save('cycloid.gif')
HTML(html)

6.3. 極方程式#

今までは、直交座標系と呼ばれる、いわゆる\(x\)軸と\(y\)軸からなる座標系で考えてきましたが、複素数でもみた極形式と同じように、ある点からの

  • 距離

  • 角度 によって座標を表すことも可能です。 それを普通の平面上(\(\mathbb{R}^2\))で考えたものが極方程式です。

定義/極方程式

平面上の曲線\(C\)が極座標\((r, \theta)\)によって、

  • \(r=f(\theta)\)

  • \(F(r,\theta)=0\) (\(r\)\(\theta\)の式\(= 0\))

のいずれかで書かれるとき、この方程式を曲線\(C\)極方程式という。

極方程式では、

  • 図形のイメージを掴む

  • 複数の点をプロットすることによって概形を描けるようになる

ことが習得の鍵になるでしょう。

では実際の例を見てみましょう。

6.3.1. 極を通る直線#

動径方向となす角が一定な直線上の点の軌跡と見ることができるので、

(6.1)#\[\begin{equation} \theta = (定数) \end{equation}\]

になります。

6.3.2. #

極方程式

(6.2)#\[\begin{equation} r = {(定数)} \end{equation}\]

を表します。

円は極からの距離が等しい点の軌跡と見ることができるので、直感的にも、わかりやすいのではないでしょうか。 半径が一定で、角度は任意、そんな図形は確かに円です。

Hide code cell source
# 半径
radius = 2
# 描画の細かさ
stp = 0.1

stp_line = 0.00001
max_range = 2 * np.pi
theta = np.arange(0, max_range, stp_line)
thetas = np.arange(0, max_range, stp)
def f(x):
  return radius
# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()
ax.set_aspect('equal')

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)

6.3.3. アルキメデスの螺旋#

極方程式

(6.3)#\[\begin{equation} r = \alpha \theta \end{equation}\]

で表される曲線はアルキメデスの螺旋と呼ばれます。では、実際に描いてみたいと思います。

Hide code cell source
# αの値
alpha = 1
# 描画の細かさ
stp = 0.2

stp_line = 0.00001
max_range = 6 * np.pi
theta = np.arange(0, max_range, stp_line)
thetas = np.arange(0, max_range, stp)
def f(x):
  return a * x

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)

6.3.4. カージオイド#

カージオイドの極方程式は

(6.4)#\[\begin{equation} r=a(1\pm \cos \theta) \quad {または} \quad r=a(1\pm \sin \theta) \end{equation}\]

と表されます。

以下では、\(r=a(1+\cos \theta)\)として描いています。これも\(a\)の値や\(\pm\)を変えて図形の変化を見てみましょう。

  • \(r=a(1-\cos \theta )\)または\(r=a(1-\sin \theta )\)にする場合 \(\to\) is_positive = 0とする

  • \(r=a(1\pm \sin \theta )\) にする場合 \(\to\) is_cos = 0とする

Hide code cell source
a = 1
# ±のうち+なら1, -なら0
is_positive = 1
# 上の式のcosの方なら1, sinの方なら2
is_cos = 1
# 描画の細かさ
stp = 0.1

stp_line = 0.00001
max_range = 2 * np.pi
theta = np.arange(0, max_range, stp_line)
thetas = np.arange(0, max_range, stp)
def f(x):
  return a * (1 + (np.cos(x) if is_cos else np.sin(x))) * (1 if is_positive else -1)

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)

6.3.5. レムニスケート#

レムニスケートは

(6.5)#\[\begin{equation} r^2 = a^2 \cos 2\theta \end{equation}\]

で表されます。こう書かれるとどんな図形か全くわからないので、とりあえず描いてみます。

Hide code cell source
alpha = 1
stp = 0.2

stp_line = 0.00001
max_range = 2 * np.pi
theta = np.arange(0, np.pi / 4, stp_line)
theta = np.concatenate([theta, np.arange(3*np.pi / 4, 5*np.pi/4, stp_line)])
theta = np.concatenate([theta, np.arange(7*np.pi / 4, 2*np.pi, stp_line)])

thetas = np.arange(0, np.pi / 4, stp)
thetas = np.concatenate([thetas, np.arange(3*np.pi / 4, 5*np.pi/4, stp)])
tehtas = np.concatenate([thetas, np.arange(7*np.pi / 4, 2*np.pi, stp)])
def f(x):
  return (a **2) * np.cos(2 * x)

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)

6.3.6. 蜘蛛の巣#

極方程式

(6.6)#\[\begin{equation} r = a \cos ^2(n\theta) + b \sin ^2 (n\theta) \end{equation}\]

で表される曲線は蜘蛛の巣になります。

\(a\)\(b\), \(n\)の値を変えてみると、いろいろな形に変化します。

Hide code cell source
a = 10
b = 9

n = 9
# 描画の細かさ
stp = 0.1

# 描画スタートのθ
min_range = 0
# 描画終了のθ
max_range = 2 * np.pi

stp_line = 0.00001
theta = np.arange(min_range, max_range, stp_line)
thetas = np.arange(min_range, max_range, stp)
def f(a, b, x, n):
  return a * (np.cos(n * x) ** 2) + b * (np.sin(n * x) ** 2)

# base figure
X,Y = coordinate(f(a, b, theta, n), theta)

# base figure
X,Y = coordinate(f(a, b, n, theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(a,b,n,t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)

6.3.7. 二次曲線の極方程式#

二次曲線\(C\)の焦点を極とする極座標において、\(C\)の極方程式は

(6.7)#\[\begin{equation} r=\frac{ae}{1-e\cos \theta} \end{equation}\]

です。ここで\(e\)は離心率と呼ばれ、

  • \(0<e<1 \to\) 楕円

  • \(e=1\to\) 放物線

  • \(e > 1 \to\) 双曲線

になります。

では実際に図で表すとどんな感じになるか見てみましょう。

Caution

\(e\geqq 1\)の時、つまり双曲線、放物線の場合には一部の点が発散してしまうので、\(\frac{\pi}{4}\leqq \theta \leqq \frac{7\pi}{4}\)で表示しています。

以下では、

\[\begin{align*} \begin{cases} a=0.5 & \\ e = 0.8 & \end{cases} \end{align*}\]

で描画しています。

Hide code cell source
# aの値と離心率(いろいろ変更してどのように変化するか見てみよう!)
a = 0.5
e = 0.8

## 描画の細かさ (θの幅指定。細かくしたければここの値を小さくすれば良いです)
stp = 0.1

# 極方程式
def f(x):
  return a / (1 - e * np.cos(x))

stp_line = 0.00001
# 双曲線は発散するから描画範囲を限定している
if e >= 1:
  theta = np.arange(np.pi/4, 7 * np.pi / 4, stp_line)
  thetas = np.arange(np.pi/4, 7 * np.pi / 4, stp)
  r = a / (1 - e * np.cos(theta))
  hyp = 1
else:
  theta = np.arange(0, 2 * np.pi, stp_line)
  thetas = np.arange(0, 2 * np.pi, stp)

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y, '焦点'))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml()
# ani.save('quadric.gif')
plt.close(fig)
HTML(html)

6.4. 演習問題#

では、極方程式が与えられた時に、どのような図形になるか、実際に自分の手で描いてみましょう。

描いてみたら、解答と見比べ、さらにパラメータを変更してどのような変化があるか、考察してみましょう。

6.4.1. 正葉曲線#

極方程式

\[\begin{equation*} r = \sin 2\theta \end{equation*}\]

で表される曲線の概形を、次の表を利用して描け。

\(\theta\)

\(0\)

\(\frac{\pi}{6}\)

\(\frac{\pi}{4}\)

\(\frac{\pi}{3}\)

\(\frac{\pi}{2}\)

\(\frac{2\pi}{3}\)

\(\frac{3\pi}{4}\)

\(\frac{5\pi}{6}\)

\(r\)

\(\theta\)

\(\pi\)

\(\frac{7\pi}{6}\)

\(\frac{5\pi}{4}\)

\(\frac{4\pi}{3}\)

\(\frac{3\pi}{2}\)

\(\frac{5\pi}{3}\)

\(\frac{7\pi}{4}\)

\(\frac{11\pi}{6}\)

\(r\)

Hide code cell source
# 各値の指定
a = 1
n = 2
# r = a cos nθにするかどうかの指定。is_cos = 1ならr = a cos nθになる。
is_cos = 0
# アニメーションの細かさ
stp = 0.2

stp_line = 0.00001
theta = np.arange(0, 2 * np.pi, stp_line)
thetas = np.arange(0, 2 * np.pi, stp)
def f(x):
  return a * (np.cos(n*x) if is_cos else np.sin(n * x))

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)
Hide code cell output

発展問題

極方程式

(6.8)#\[\begin{equation} r=a\sin n \theta \quad \text{または} \quad r = a\cos n \theta \end{equation}\]

で表される図形において、\(a\)\(n\)の値、\(\sin\)\(\cos\)を変更すると、曲線の概形はどのように変化するだろうか。考察し自分で概形を描いたのちに、以下のコードを実行してみなさい。

解答コードに関する注意

解答に関する説明

解答はデフォルトで\(r=\sin 2 \theta\)ですが、コード中のa = 1n = 2, is_cos = 0, is_cos = 1に変更してどんな図形になるか観察してみましょう。 その際、

  • is_cos = 0ならば\(r = a \sin n \theta\)

  • is_cos = 1ならば\(r = a \cos n \theta\)

を表しています(a,nは式の中の文字と同じ)。

解答.

Hide code cell source
# 各値の指定
a = 2
n = 2
# r = a cos nθにするかどうかの指定。is_cos = 1ならr = a cos nθになる。
is_cos = 1
# アニメーションの細かさ
stp = 0.2

stp_line = 0.00001
theta = np.arange(0, 2 * np.pi, stp_line)
thetas = np.arange(0, 2 * np.pi, stp)
def f(x):
  return a * (np.cos(n*x) if is_cos else np.sin(n * x))

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)
Hide code cell output

解説.

極方程式

(6.9)#\[\begin{equation} r=a\sin n \theta \quad \text{または} \quad r = a\cos n \theta \end{equation}\]

の形で表される曲線を正葉曲線といいます。 ここまでは暗黙のうちに、\(n\)は1以上の整数としてきましたが、実際のところ\(n\)が有理数なら図形が描けます。 上のコードで値を変更して、試してみましょう。

超絶余談ですが、英語だとRose Curveというそう。ということは「バラ=正葉」ということか!?

6.4.2. リマソン(パスカルの蝸牛)#

極方程式

\[\begin{equation*} r = 1 + 2 \cos \theta \end{equation*}\]

で表される曲線の概形を描け。

解答.

Hide code cell source
# 各値の指定
a = 1
b = 2

# アニメーションの細かさ
stp = 0.2

stp_line = 0.00001
theta = np.arange(0, 2 * np.pi, stp_line)
thetas = np.arange(0, 2 * np.pi, stp)
def f(x):
  return a + b * np.cos(x)

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)
Hide code cell output

解説.

極方程式

(6.10)#\[\begin{equation} r = a + b \cos \theta \end{equation}\]

が表す曲線をリマソンまたはパスカルの蝸牛といいます。蝸牛というのは我々の耳の中にある渦巻管と呼ばれる感覚器官のことです。

さて、この一般化された極方程式はどのように変化するのでしょうか?

発展問題

先ほどの極方程式を一般化して、

(6.11)#\[\begin{equation} r = a + b \cos \theta \end{equation}\]

で表される曲線の概形が\(a,b\)が変化するとどのように変わるか考察しなさい。さらに、\(a=b\)のときは、どのような曲線になるか答えなさい。そして、それをプログラムを実行することによって確かめなさい。

解説.

\(a=b\)のとき、前に見たカージオイドになります。実際、カージオイドの極方程式は

(6.12)#\[\begin{equation} r=a(1\pm \cos \theta) \quad {または} \quad r=a(1\pm \sin \theta) \end{equation}\]

であり、リマソンの式に\(a=b\)を代入すれば、

\[\begin{align*} r &= a + b \cos \theta = a+a\cos \theta \\ &=a(1+\cos \theta) \end{align*}\]

になり、カージオイドの極方程式に一致します。

本当にこのようになっているか、この上のプログラムにおいて、\(a=b=1\)などを代入して実際に実行してみましょう。

6.4.3. 双曲螺旋#

極方程式

\[\begin{equation*} r = \frac{1}{\theta} \end{equation*}\]

によって表される曲線を描きなさい。

Hide code cell source
a = 1
# 描画の細かさ
stp = 0.2


# drawing range settings
min_range = np.pi / 3 if p > 0 else 0
max_range = 8 * np.pi if p > 0 else 6 * np.pi

stp_line = 0.00001
theta = np.arange(min_range, max_range, stp_line)
thetas = np.arange(min_range, 2 * max_range, stp)
def f(x):
  return a / x

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)
Hide code cell output

解説.

極方程式

(6.13)#\[\begin{equation} r = \frac{a}{\theta} \end{equation}\]

によって表される曲線を は双曲螺旋です。ここで重要なのは、\(\theta\)が小さい方から徐々に大きくなる時の、点の動きです。点は螺旋の外から内に向かって進みます。

逆に、\(\theta\)が分子に来るものはアルキメデスの螺旋でした。アルキメデスの螺旋では、\(\theta\)が大きくなるにつれて\(r\)は小さくなりました。この双曲螺旋では逆に、\(\theta\)が大きくなると\(r\)は小さくなります。

  • アルキメデスの螺旋\(\to\) \(\theta\)が大きくなると、\(r\)も大きくなる\(\Rightarrow\)内から外へ巻く

  • 双曲螺旋\(\to\) \(\theta\)が大きくなると\(r\)は小さくなる\(\Rightarrow\)外から内へ巻く

発展問題

極方程式

\[\begin{equation*} r = \frac{a}{\sqrt{\theta}} \end{equation*}\]

\(a=1\)などのときに、どのような形になるか考察し、以下のコードを実行して確かめなさい。

さらに発展的に、

\[\begin{equation*} r = a \theta ^{-p} \end{equation*}\]

がどのような形になるか、こちらも\(a=1\)などの時について考察し、同様にコードを実行して確かめなさい。ただし、ここで\(p\)は有理数とする。

解答.

Hide code cell source
a = 1
p = -1
# 描画の細かさ
stp = 0.2


# drawing range settings
min_range = np.pi / 3 if p > 0 else 0
max_range = 8 * np.pi if p > 0 else 6 * np.pi

stp_line = 0.00001
theta = np.arange(min_range, max_range, stp_line)
thetas = np.arange(min_range, max_range, stp)
def f(x):
  # to prevent from dividing with 0
  return a / (x ** p) if p > 0 else a * (x ** abs(p))

# base figure
X,Y = coordinate(f(theta), theta)
fig, ax = plt.subplots()

# animation drawing section
artists = []
artist_prev = []
for t in thetas:
  artists.append(draw_steps(ax,artist_prev, f(t), t))

artists.append(draw_finish(ax, artist_prev, X, Y))

ani = matplotlib.animation.ArtistAnimation(fig, artists, interval=500)
html = ani.to_jshtml(default_mode = 'once')
plt.close(fig)
HTML(html)
Hide code cell output

解説.

極方程式

(6.14)#\[\begin{equation} r = \frac{a}{\sqrt{\theta}} \end{equation}\]

この極方程式で表される曲線はリチュースと呼ばれます。 これは先ほど見た双曲螺旋の分母に\(\sqrt{\cdot}\)をとったものです。

先ほどの双曲螺旋よりも、原点に近づいてゆくスピードが遅いことがわかります。これは分母に\(\sqrt{\cdot}\)がついたことで、\(\sqrt{\theta}\)が増加しづらくなった、つまり全体としては\( \frac{a}{\sqrt{\theta}}\)は減少しづらくなった、ということを表しています。

つまり、

  • \(p\)の値が大きいほど、原点に近づくスピードが速い

  • \(p\)の値が小さいほど、原点に近づくスピードが遅い

\(p\)が有理数ならなんでも良いわけで、仮にこれが負の有理数になると、アルキメデスの螺旋になります。実際に\(p=-1\)を代入してプログラムを実行してみましょう。